package com.heima.controller;

import com.heima.pojos.Assignment;
import com.heima.pojos.User;
import com.heima.pojos.UserStudentAssignment;
import com.heima.service.AssignmentService;
import com.heima.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("/v1")
public class AssignmentController {
    @Autowired
    private AssignmentService assignmentService;


    /**
     * 发布作业
     *
     * @param assignment
     * @return
     */
    @PostMapping("/work/publishWork")
    public R addWork(@RequestBody Assignment assignment) {

        return assignmentService.addWork(assignment);
    }

}
